package com.lql.modules.service.impl.callback;

/**
 * @Title:
 * @Description:
 * @Author: longge
 * @Date: 2020/9/18
 * @Version: V1.0
 */

import com.lql.common.api.R;
import com.lql.common.model.BaseComponent;
import com.lql.common.util.RequestUtil;
import com.lql.modules.service.CallBackService;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * 支付充值回调
 */
@Service("xingqiaoNotify")
@AllArgsConstructor
@Log4j2
public class XingqiaoCallBackServiceImpl extends BaseComponent implements CallBackService<Object> {

    @Override
    public Object executeBackProcess(String business, HttpServletRequest request, HttpServletResponse response) {

        Map<String, String> parameterMap = RequestUtil.getParameterMap(request);

        parameterMap.forEach((key, value) -> {
            System.out.println(key + "：" + value);
        });

        return R.success("通知接收成功");
    }
}
